﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<DemandInputModels>" %>

<%@ Import Namespace="SDT.Lib.Helpers" %>
<%@ Import Namespace="SDT.Lib.Paging" %>
<%@ Import Namespace="SDT.Admin.ViewModels" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Chi tiết nhu cầu
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <%if (ViewData["MessageInfo"] == null)
      { %>
      <div id="tabs">
        <ul>
            <li><a href="#tabs-1">Thông tin chung</a></li>
            <li><a href="#tabs-2">Thông tin liên lạc</a></li>
        </ul>
        <div id="tabs-1">
            <table class="admintable">
                <tbody>
                    <tr>
                <td class="key">Loại nhu cầu</td>
                <td><%=Model.DemandType != null ? Model.DemandType.Name : string.Empty %></td>
            </tr>
            <tr>
                <td class="key">
                    Tên chuyên mục
                </td>
                <td>
                    <%=Model.Demand.DemandCategory.Name%>
                </td>
            </tr>
            <tr>
                <td class="key">
                    Tỉnh/Thành phố
                </td>
                <td>
                    <%=Model.Demand.City.Name%>
                </td>
            </tr>
            <tr>
                <td class="key">
                    Quận/Huyện
                </td>
                <td>
                    <%=Model.Demand.District.Name %>
                </td>
            </tr>
            <tr>
                <td class="key">
                    Tiêu đề
                </td>
                <td>
                    <%=Model.Demand.Title %>
                </td>
            </tr>
            <tr>
                <td class="key">
                    Mô tả
                </td>
                <td>
                    <%= Model.Demand.Description %>
                </td>
            </tr>
            <tr>
                <td class="key">
                    Số tầng
                </td>
                <td>
                    <%=Model.Demand.Floors %>
                </td>
            </tr>
            <tr>
                <td class="key">
                    Số phòng
                </td>
                <td>
                    <%=Model.Demand.Rooms %>
                </td>
            </tr>
            <tr>
                <td class="key">
                    Giá
                </td>
                <td>
                    <%=Model.Demand.Cost %>
                    ( <%= Model.Demand.CurrencyName%><%= Model.Demand.UnitCost%> )
                </td>
            </tr>
            <tr>
                <td class="key">
                    Diện tích
                </td>
                <td>
                    <%=Model.Demand.Area %> m2
                </td>
            </tr>
            <tr>
                <td class="key">Ngày hết hạn</td>
                <td><%=string.Format("{0:dd/MM/yyyy}", Model.Demand.ExpireDate )%></td>
            </tr>
            <tr>
                <td class="key">
                    Trạng thái hiển thị
                </td>
                <td>
                    <%= Html.RadioButtonFor(m=>m.Demand.PubYN,Model.Demand.PubYN != null ?  Model.Demand.PubYN : false)%>
                    Đăng tin
                    <%= Html.RadioButtonFor(m=>m.Demand.PubYN,Model.Demand.PubYN != null ? !Model.Demand.PubYN : false)%>
                    Không đăng
                </td>
            </tr>
            <tr>
                <td class="key">
                    Tin HOT?
                </td>
                <td>
                    <%= Html.RadioButtonFor(m => m.Demand.HotYN, Model.Demand.HotYN != null ? Model.Demand.HotYN : false)%>
                    Tin hot
                    <%= Html.RadioButtonFor(m => m.Demand.HotYN, Model.Demand.HotYN != null ? !Model.Demand.HotYN : false)%>
                    Tin không hot
                </td>
            </tr>
            <tr>
                <td class="key">
                    Tin VIP?
                </td>
                <td>
                    <%= Html.RadioButtonFor(m => m.Demand.VIPYN, Model.Demand.VIPYN != null ? Model.Demand.VIPYN : false)%>
                    Tin VIP
                    <%= Html.RadioButtonFor(m => m.Demand.VIPYN, Model.Demand.VIPYN != null ? !Model.Demand.VIPYN : false)%>
                    Tin không VIP
                </td>
            </tr>
            <tr>
                <td class="key">
                    MetaDescription
                </td>
                <td>
                    <%=Model.Demand.MetaDescription %>
                </td>
            </tr>
            <tr>
                <td class="key">
                    MetaKeyword
                </td>
                <td>
                    <%=Model.Demand.MetaKeyword %>
                </td>
            </tr>
            <tr>
                <td class="key">
                    MetaTag
                </td>
                <td>
                    <%=Model.Demand.MetaTag %>
                </td>
            </tr>
                </tbody>
            </table>
        </div>
        <div id="tabs-2">
            <table class="admintable">
                <tbody>
                    <tr>
                        <td class="key">Họ tên</td>
                        <td><%=Model.Demand.ContactName%></td>
                    </tr>
                    <tr>
                <td class="key">
                    Địa chỉ
                </td>
                <td>
                    <%=Model.Demand.ContactAddress %>
                </td>
                     </tr>
                     <tr>
                        <td class="key">Mobile</td>
                        <td><%=Model.Demand.ContactMobile %></td>
                    </tr>
            <tr>
                <td class="key">
                    Yahoo
                </td>
                <td>
                    <%=Model.Demand.ContactYahoo %>
                </td>
            </tr>
                    <tr>
                        <td class="key">Skype</td>
                        <td><%=Model.Demand.ContactSkyper%></td>
                    </tr>
                </tbody>
            </table>
        </div>
      </div>
      <script type="text/javascript">
        $(document).ready(function(){
        
        $("#tabs").tabs();
        })
      </script>
    <%}%>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Toolbar" runat="server">
    <%= Html.Toolbar("Sửa", "/Demands/Edit/" + Model.ID, "edit")%>
    <%= Html.Toolbar("Xoá", "/Demands/Delete/" + Model.ID, "delete")%>
    <%= Html.Toolbar("Quay về", "/Demands", "back") %>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="Header" runat="server">
    Chi tiết nhu cầu
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="Message" runat="server">
    <%=ViewData["MessageInfo"]!=null? "<p class='perror'>"+Html.Encode(ViewData["MessageInfo"])+"</p>":string.Empty%>
</asp:Content>
